package com.his.controller;


import com.his.common.util.SerialNoUtil;
import com.his.common.util.Utils;
import com.his.config.annotation.CurrentUser;
import com.his.controller.Vo.Test1Vo;
import com.his.controller.Vo.TestVo;
import com.his.elasticsearch.service.DictItemService;
import com.his.login.entity.DictEmployee;
import com.xiao.common.controller.ResultBaseController;
import com.xiao.common.service.SessionService;
import com.xiao.common.util.RedisUtils;
import com.xiao.common.util.ResultUtil;
import com.xiao.common.util.WorkIdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;


/**
 * @Author Administrator
 * @Date 2019/11/29
 */
@Controller
public class IndexController extends ResultBaseController {
    @Autowired
    private SessionService sessionService;
    @Resource
    private DictItemService dictItemService;
    @Resource
    private SerialNoUtil serialNoUtil;

    @RequestMapping(value="index")
    @ResponseBody
    public ResultUtil index(String CateName,String hospId,String cateId){
        //redisUtils.set("key4","123456789");
        //WorkIdUtil.nextId();
        //dictItemService.queryByCateName(CateName,hospId,cateId);
        return this.success("成功", serialNoUtil.getInPatiId("0871"));

//xiaoxiaodianduiandcnuiewc,dnsiandiuewnduiewndscew
        //dnejwhduinewqudiuadewd
    }
    @RequestMapping(value="test")
    @ResponseBody
    public ResultUtil test(@CurrentUser DictEmployee dictEmployee, String text){
        Map returnMap = new HashMap();
        //DictEmployee dictEmployee = (DictEmployee) sessionService.getSessionUser(name);
        //returnMap.put("name",name);
        //returnMap.put("text",text);
        return this.success("成功",dictEmployee);
    }
}
